Drift method and apparatus for virtual vehicle in virtual world and storage medium

ABSTRACT

A drift method for a virtual vehicle in a virtual world is disclosed, including: receiving an operation start event with respect to a target interaction control that is provided on a user interface of an application while a virtual vehicle in a virtual world in the application is in a normal traveling state; controlling, according to the operation start event, the virtual vehicle to enter a drift state in the virtual world; and after an operation end event with respect to the target interaction control is received, controlling the virtual vehicle to remain in the drift state based on an angle between a vehicle head direction and a traveling direction being greater than or equal to a first threshold.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a bypass continuation application of InternationalApplication No. PCT/CN2019/115519, filed on Nov. 5, 2019, which claimspriority to Chinese Patent Application No. 201811433526.3, entitled“DRIFT METHOD AND APPARATUS FOR VIRTUAL VEHICLE IN VIRTUAL WORLD ANDSTORAGE MEDIUM” and filed with the National Intellectual PropertyAdministration, PRC on Nov. 28, 2018, the disclosures of which areherein incorporated by reference in their entireties.

FIELD

The disclosure relates to the field of computer programs, and inparticular, to a drift method and apparatus for a virtual vehicle in avirtual world and a storage medium.

BACKGROUND

Automobile racing games are a type of games popular with users.Currently, three-dimensional automobile racing games built in athree-dimensional virtual world are provided.

In the related art, a user generally uses a smartphone to run anautomobile racing game application. In the running process, a userinterface of the automobile racing game application is displayed on thesmartphone. The user interface includes a traveling picture of a racingautomobile traveling in a track in a virtual world, and a left directionkey, a right direction key, and a drift control overlaying the travelingpicture. If the user presses a direction key first, and then presses thedrift control, the automobile racing game application controls,according to the press operation performed by the user, the racingautomobile to enter a drift state.

In the related art, the user needs to simultaneously press a directionkey and the drift control key in order to trigger a drift of the racingautomobile and hold the drift state of the racing automobile, whichrequires cumbersome man-machine interaction operations, and is notconducive for the user to operate quickly in scenarios such as when theuser is in a subway or a bus. Once an event occurs, such as a collisionor a wobble occurring in the subway or the bus, the drift process of theracing automobile in the game application is likely to be accidentallyinterrupted.

SUMMARY

Embodiments of the disclosure provide a drift method and apparatus for avirtual vehicle in a virtual world and a storage medium.

According to an aspect of an example embodiment, provided is a driftmethod for a virtual vehicle in a virtual world, performed by a terminalincluding at least one processor, the method including: receiving anoperation start event with respect to a target interaction control thatis provided on a user interface of an application while a virtualvehicle in a virtual world in the application is in a normal travelingstate; controlling, according to the operation start event, the virtualvehicle to enter a drift state in the virtual world; and after anoperation end event with respect to the target interaction control isreceived, controlling the virtual vehicle to remain in the drift statebased on an angle between a vehicle head direction and a travelingdirection being greater than or equal to a first threshold.

The controlling the virtual vehicle to remain in the drift state mayinclude: increasing a dynamic drift-holding traction on the virtualvehicle along the vehicle head direction, the dynamic drift-holdingtraction being used for controlling the virtual vehicle to remain in thedrift state.

A magnitude of the dynamic drift-holding traction may be in a positivecorrelation with a speed of the virtual vehicle in a preset speed range.

The method may further include: changing a ground friction of thevirtual vehicle from a first friction value to a second friction valuebased on the angle between the vehicle head direction and the travelingdirection being greater than or equal to the first threshold after theoperation end event corresponding to the target interaction control isreceived, the first friction value being greater than the secondfriction value.

The method may further include: continuously increasing an attributevalue of the virtual vehicle during the drift state; activating anacceleration control of the virtual vehicle on the user interface basedon the attribute value reaching a trigger threshold; and based on atrigger signal with respect to the acceleration control being received,controlling the virtual vehicle to accelerate.

The method may further include: based on the angle between the vehiclehead direction and the traveling direction being less than the firstthreshold while the virtual vehicle is in the drift state, controllingthe virtual vehicle to restore the normal traveling state.

The controlling the virtual vehicle to restore the normal travelingstate may include: switching a dynamic drift-holding traction of thevirtual vehicle to a normal traveling traction, the dynamicdrift-holding traction being used for controlling the virtual vehicle toremain in the drift state and the normal traveling traction being usedfor controlling the virtual vehicle to enter the normal traveling state,and the dynamic drift-holding traction being greater than the normaltraveling traction.

The method may further include: changing a ground friction of thevirtual vehicle from a second friction value to a first friction valuebased on the angle between the vehicle head direction and the travelingdirection being less than the first threshold while the virtual vehicleis in the drift state, the second friction value being a friction valueat which the virtual vehicle remains in the drift state, and the firstfriction value being greater than the second friction value.

The method may further include: receiving a direction control operation;changing the vehicle head direction of the virtual vehicle according tothe direction control operation; and determining an angle between thechanged vehicle head direction and the traveling direction.

The method may further include: after the operation end eventcorresponding to the target interaction control is received, controllingthe virtual vehicle to switch from the drift state to the normaltraveling state upon a lapse of a target duration, based on the anglebetween the vehicle head direction and the traveling direction beingless than a second threshold, the second threshold being less than thefirst threshold.

The controlling the virtual vehicle to switch from the drift state tothe normal traveling state upon the lapse of the target duration mayinclude: calculating, according to a speed of the virtual vehicle and aground friction on the virtual vehicle, a decay duration during whichthe virtual vehicle transitions from the drift state to the normaltraveling state; controlling, based on the decay duration being greaterthan or equal to a shortest drift duration, the virtual vehicle totransition from the drift state to the normal traveling state accordingto the decay duration; and controlling, based on the decay durationbeing less than the shortest drift duration, the virtual vehicle totransition from the drift state to the normal traveling state accordingto the shortest drift duration.

According to an aspect of an example embodiment, provided is a driftapparatus for a virtual vehicle in a virtual world, including: at leastone memory configured to store program code; and at least one processorconfigured to read the program code and operate as instructed by theprogram code, the program code including: interaction code configured tocause at least one of the at least one processor to receive an operationstart event with respect to a target interaction control that isprovided on a user interface of an application while a virtual vehiclein a virtual world in the application is in a normal traveling state;and control code configured to cause at least one of the at least oneprocessor to control, according to the operation start event, thevirtual vehicle to enter a drift state in the virtual world, the controlcode being further configured cause at least one of the at least oneprocessor to, after an operation end event with respect to the targetinteraction control is received, control the virtual vehicle to remainin the drift state based on an angle between a vehicle head directionand a traveling direction being greater than or equal to a firstthreshold.

The control code may be further configured to cause at least one of theat least one processor to increase a dynamic drift-holding traction onthe virtual vehicle along the vehicle head direction based on the anglebetween the vehicle head direction and the traveling direction beinggreater than the first threshold after the operation end eventcorresponding to the target interaction control is received, the dynamicdrift-holding traction being used for controlling the virtual vehicle toremain in the drift state.

The control code may be further configured to cause at least one of theat least one processor to change a ground friction of the virtualvehicle from a first friction value to a second friction value based onthe angle between the vehicle head direction and the traveling directionbeing greater than or equal to the first threshold after the operationend event corresponding to the target interaction control is received,the first friction value being greater than the second friction value.

The control code may be further configured to cause at least one of theat least one processor to continuously increase an attribute value ofthe virtual vehicle during the drift state, activate an accelerationcontrol of the virtual vehicle on the user interface based on theattribute value reaching a trigger threshold, and control the virtualvehicle to accelerate based on a trigger signal with respect to theacceleration control being received.

The control code may be further configured to cause at least one of theat least one processor to control the virtual vehicle to restore thenormal traveling state, based on the angle between the vehicle headdirection and the traveling direction being less than the firstthreshold while the virtual vehicle is in the drift state.

The control code may be further configured to cause at least one of theat least one processor to switch a dynamic drift-holding traction of thevirtual vehicle to a normal traveling traction, the dynamicdrift-holding traction being used for controlling the virtual vehicle toremain in the drift state and the normal traveling traction being usedfor controlling the virtual vehicle to enter the normal traveling state,and the dynamic drift-holding traction being greater than the normaltraveling traction.

The control code may be further configured to cause at least one of theat least one processor to change a ground friction of the virtualvehicle from a second friction value to a first friction value based onthe angle between the vehicle head direction and the traveling directionbeing less than the first threshold while the virtual vehicle is in thedrift state, the second friction value being a friction value at whichthe virtual vehicle remains in the drift state, and the first frictionvalue being greater than the second friction value.

According to an aspect of an example embodiment, provided is a terminal,including a processor and a memory, the memory storing computer-readableinstructions, the computer-readable instructions, when being executed bythe processor, causing the processor to perform operations in theforegoing method(s).

According to an aspect of an example embodiment, provided is anon-transitory computer-readable storage medium, storingcomputer-readable instructions, the computer-readable instructions, whenexecuted by one or more processors, causing the one or more processorsto perform: receiving an operation start event with respect to a targetinteraction control that is provided on a user interface of anapplication while a virtual vehicle in a virtual world in theapplication is in a normal traveling state; controlling, according tothe operation start event, the virtual vehicle to enter a drift state inthe virtual world; and after an operation end event with respect to thetarget interaction control is received, controlling the virtual vehicleto remain in the drift state based on an angle between a vehicle headdirection and a traveling direction being greater than or equal to afirst threshold.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions of the example embodiments of thedisclosure more clearly, the following briefly introduces theaccompanying drawings for describing the example embodiments.Apparently, the accompanying drawings in the following description showmerely some embodiments of the disclosure, and a person of ordinaryskill in the art may still derive other drawings from the accompanyingdrawings without creative efforts.

FIG. 1 is a flowchart of a drift method for a virtual vehicle in avirtual world according to an example embodiment of the disclosure.

FIG. 2 is a schematic interface diagram of a drift method for a virtualvehicle in a virtual world according to an example embodiment of thedisclosure.

FIG. 3 is a flowchart of a drift method for a virtual vehicle in avirtual world according to another example embodiment of the disclosure.

FIG. 4 is a force analysis diagram of a virtual vehicle travelingnormally in a virtual world according to another example embodiment ofthe disclosure.

FIG. 5 is a force analysis diagram of a virtual vehicle traveling in adrift-holding state in a virtual world according to another exampleembodiment of the disclosure.

FIG. 6 is a flowchart of a drift method for a virtual vehicle in avirtual world according to another example embodiment of the disclosure.

FIG. 7 is a schematic interface diagram of a drift method for a virtualvehicle in a virtual world according to an example embodiment of thedisclosure.

FIG. 8 is a schematic interface diagram of a drift method for a virtualvehicle in a virtual world according to an example embodiment of thedisclosure.

FIG. 9 is a graph illustrating an example of a correspondence between adynamic drift traction and a friction according to an example embodimentof the disclosure.

FIG. 10 is a schematic interface diagram of a drift method for a virtualvehicle in a virtual world according to an example embodiment of thedisclosure.

FIG. 11 is a schematic diagram of a drift apparatus for a virtualvehicle in a virtual world according to an example embodiment of thedisclosure.

FIG. 12 is a schematic structural diagram of a computer device accordingto an embodiment of the disclosure.

DETAILED DESCRIPTION

To make the objectives, technical solutions, and advantages of thedisclosure clearer, the following further describes implementations ofthe disclosure in detail with reference to the accompanying drawings.

The disclosure may be applied to the following scenarios.

An automobile racing game application refers to an application providingfor one or more players to race in a same track. The application allowsa racing automobile to enter a drift state during traveling. The driftstate refers to a movement state in which a vehicle body slides througha turn in a case that a relatively large angle is generated between avehicle head direction and a traveling direction. The application may bea standalone application or a network application. The applicationallows various competition manners such as individual racing, teamracing, individual props, and team props. A racing automobile providedin the application may be at least one of a motorbike, a go-kart, a car,an electric vehicle, and a cartoon car.

A gunfight game application refers to an application providing for oneor more players to perform a combat in an open game world. Theapplication allows a game character to drive a military vehicle such asan infantry fighting vehicle, an armored personnel carrier, a scout car,a communication vehicle, a tracked vehicle, a tank, or an armored car inthe open game world and control the military vehicle to enter a driftstate while driving.

A sandbox game application refers to an open and creative applicationincluding one or more areas on a map and integrating various gameelements such as action, shooting, fighting, and driving. Theapplication allows a game character to drive various types of civiliancars in an open virtual world, and controls the cars to enter a driftstate while driving.

A virtual vehicle in the related art is affected by, for example, aground friction (and a wind resistance) in a virtual environment. When adrift operation performed by a user is canceled, the ground frictioncauses the virtual vehicle to decelerate rapidly, thereby canceling thedrifting state, or even decelerating to zero.

Many current applications are developed based on smartphones or tabletcomputers. When a user uses a smartphone or a tablet computer to controla virtual vehicle on a transportation means, the virtual racingautomobile is likely to be affected by factors such as a jolt and acollision in a real world, and therefore, the racing automobile cannotremain in a continuous drift state. The following embodiments areprovided in the disclosure and may be used for resolving the foregoingtechnical problems.

FIG. 1 is a flowchart of a drift method for a virtual vehicle (or amethod of controlling a drift state of a virtual vehicle) in a virtualworld according to an example embodiment of the disclosure. Thisembodiment is described by using an example in which the method isapplicable to a terminal running an application. The application is aprogram allowing a virtual vehicle to enter a drift state in a travelingprocess. The method includes operations 101-103:

Operation S101. Receive an operation start event corresponding to atarget interaction control in a process in which a virtual vehicle inthe virtual world is in a normal traveling state.

The application may be an automobile racing game application, an onlinegame application, a mobile game application, or the like. Theapplication is provided with a virtual world, and a virtual vehicle inthe virtual world is provided. For illustrative purposes, an example inwhich the application is an automobile racing game application is used,and the virtual vehicle may be a racing automobile.

The virtual world is a three-dimensional virtual world constructed basedon a three-dimensional virtual engine. The three-dimensional virtualworld is provided with an environment constructed for the virtualvehicle to travel. The environment includes, for example, at least oneof wildernesses, highways, tracks, and city streets.

A user interface is generated on the application and includes atraveling picture in which the virtual world is observed from a firstperspective (e.g., a perspective of a driver or an interior perspectiveof a vehicle) or a third perspective of the virtual vehicle (e.g., arear perspective of a vehicle or a far perspective), and a targetinteraction control overlaying the user interface. The targetinteraction control is a control or a set of controls configured totrigger a drift state of the virtual vehicle.

Operation S102. Control, according to the operation start event, thevirtual vehicle to enter a drift state in the virtual world.

In some embodiments, the operation start event is triggered by a useroperation on the target interaction control. Optionally, the targetinteraction control includes a direction control and a drift controldisplayed on a touch display screen. Alternatively, the targetinteraction control is a control corresponding to several physicalmodules on a racing automobile driving analog peripheral.

In some embodiments, the operation start event is triggered by a touchoperation on the touch display screen, or may be triggered by a physicaloperation of controlling an external input device, for example, aphysical operation of controlling a mouse, a VR handle, or the like.

In some embodiments, the user operation includes a tap operation, acombo operation, a long press operation, a slide operation, or the like.The type of the touch operation is not limited in this embodiment.

For example, the operation start event is generated in a case that atouch operation of simultaneously pressing a left direction key and adrift control starts to be performed by a user or is generated in a casethat a touch operation of simultaneously pressing a right direction keyand the drift control starts to be performed by the user.

The drift state refers to a movement state in which a vehicle bodyslides through a turn in a case that a relatively large angle isgenerated between a vehicle head direction and a traveling direction.The vehicle head direction refers to a direction directed to the frontof the vehicle head. The traveling direction refers to a directioncorresponding to a speed of the virtual vehicle during traveling, or anactual movement direction of the virtual vehicle in the environmentprovided in the application.

Operation S103. Control, in a case that an angle between a vehicle headdirection and a traveling direction is greater than or equal to a firstthreshold after an operation end event corresponding to the targetinteraction control is received, the virtual vehicle to remain in thedrift state.

In some embodiments, the terminal needs to monitor the angle between thevehicle head direction and the traveling direction of the virtualvehicle. Schematically, the monitoring includes, but is not limited to,at least one of the following four manners.

1. The angle between the vehicle head direction and the travelingdirection of the virtual vehicle is monitored in real time in a casethat the virtual vehicle is in the drift state.

2. After receiving the operation end event corresponding to the targetinteraction control, the terminal monitors the angle between the vehiclehead direction and the traveling direction of the virtual vehicle inreal time. The operation end event is triggered when the user operationon the target interaction control starts to disappear, for example, theoperation end event is an event generated when a touch for a touchoperation of simultaneously pressing the direction key and the driftcontrol is canceled.

3. The terminal monitors the angle between the vehicle head directionand the traveling direction of the virtual vehicle at predetermined timeintervals.

4. The terminal monitors the angle between the vehicle head directionand the traveling direction of the virtual vehicle upon receiving adirection control operation.

In a case that the angle between the vehicle head direction and thetraveling direction is greater than or equal to the first thresholdafter the operation end event corresponding to the target interactioncontrol is received, the terminal controls the virtual vehicle to remainin the drift state. “Remaining in the drift state” refers to a situationthat, in a process in which the virtual vehicle is in the drift state,even if the user stops performing a drift trigger operation, providedthat the angle between the vehicle head direction and the travelingdirection remains to be greater than or equal to the first threshold,the terminal automatically controls the virtual vehicle to remain in thedrift state (in other words, to continue the drift state and keep thedrift state not being interrupted).

As shown in FIG. 2, the terminal displays a user interface 20 of theautomobile racing application. The user interface 20 includes a leftdirection key 21, a right direction key 22, a drift button 23, and avirtual vehicle 24. The left direction key 21 is a control used forcontrolling the virtual vehicle 24 to move to a left side. The rightdirection key 22 is a control used for controlling the virtual vehicle24 to move to a right side. The drift button 23 is a control used fortriggering the virtual vehicle 24 to enter a drift state.

When the virtual vehicle 24 is driving in a curve, the usersimultaneously presses the right direction key 22 and the drift button23 as a drift trigger operation (the black fill color in the figurerepresents that the control is pressed). After receiving the drifttrigger operation, the terminal controls the virtual vehicle 24 to entera drift state.

After the user cancels pressing the right direction key 22 and the driftbutton 23 (the white fill color in the figure represents that thecontrol is not pressed), if the terminal detects that the drift triggeroperation is over, and that an angle α between a vehicle head directionand a traveling direction of the virtual vehicle 24 is greater than orequal to a threshold, then the terminal controls the virtual vehicle 24to remain in the drift state.

Thus, according to the method provided in this embodiment, after theoperation end event corresponding to the target interaction control isreceived, in a case that the angle between the vehicle head directionand the traveling direction is greater than or equal to the firstthreshold, the virtual vehicle is controlled to remain in the driftstate. In this way, in the process of controlling the virtual vehicle toremain in the drift state, the user may only control the angle betweenthe vehicle head direction and the traveling direction and does not needto simultaneously press a direction key and a drift control. Therefore,the user may only need to press the direction key to control the vehiclehead direction to remain in the drift state, thereby reducing thedifficulty of operation, and improving the convenience of man-machineinteractions in some scenarios that are not suitable for long-termoperation performed by using hands.

FIG. 3 is a flowchart of a drift method for a virtual vehicle in avirtual world according to another example embodiment of the disclosure.This embodiment is described by using an example in which the method isapplicable to a terminal running an application. The application is aprogram allowing a virtual vehicle to enter a drift state in a travelingprocess of the virtual vehicle. The application is configured to performthe method including the following operations S301-S310.

Operation S301. Start an application.

There are various applications installed on a terminal. Start icons ofthe applications may be displayed on a desktop of the terminal.

A user may click/tap a start icon of an application. The terminal startsthe application after the start icon is triggered. The application is anapplication provided with a virtual environment and a virtual vehiclelocated in the virtual environment. The application further allows thevirtual vehicle to enter a drift state during traveling.

Operation S302. Display a user interface of the application, the userinterface including a traveling picture of a virtual vehicle travelingin a virtual world.

The terminal runs the application and displays a user interface of theapplication. The user interface includes a traveling picture of avirtual vehicle traveling in a virtual world. The traveling picturedisplays a picture in which the virtual environment is observed from afirst perspective or a third perspective of the virtual vehicle. Thefirst perspective is also referred to as a perspective of a driver or aninterior perspective of a vehicle, and the third perspective is alsoreferred to as a rear perspective of a vehicle or a far perspective.

For example, when the virtual world is a three-dimensional virtualworld, the first perspective may be implemented by using a first cameradisposed at a position of a driver, and the third perspective may beimplemented by using a second camera disposed at the rear of the virtualvehicle. The first perspective and the third perspective move as thevirtual vehicle moves. In this embodiment, the traveling picture isdescribed by using an example from the third perspective, and this isnot limited herein.

In some embodiments, various types of controls overlay the travelingpicture on the user interface. The control includes at least a directionkey and a drift control. The direction key is a control used forcontrolling a movement direction of the virtual vehicle. The directionkey includes at least one of a front direction key, a left directionkey, a back direction key, and a right direction key. The drift controlis a control used for controlling the virtual vehicle to trigger and/orremain in a drift state. When the direction key (e.g., any one of thefront direction key, the left direction key, the back direction key, andthe right direction key) and the drift control are simultaneouslypressed, the virtual vehicle is controlled to enter the drift state.When the direction key and the drift control are continuously pressed,the virtual vehicle remains in the drift state during the continuouspressing.

This embodiment is described by using an example in which the targetinteraction control includes the direction key and the drift control.

In some embodiments, the control further includes, for example, at leastone of a ranking display control, a speed information control, athumbnail map control, a brake control, a jet control, and a nitrogenacceleration control. The ranking display control is a control used fordisplaying a racing automobile ranking of the current virtual vehicleamong all virtual vehicles. The speed information control is a controlused for displaying at least one piece of time information in individualrecord time, single-round racing time, and total racing time of thisround. The thumbnail map control is a control used for displaying anentire track map (and a real-time position at which the current virtualvehicle is located on the track map) from a top view by using a presetscaling. The brake control is a control used for controlling the virtualvehicle to decelerate. The jet control is a control used for controllingthe virtual vehicle to explosively accelerate in a relatively shortfirst time period. A duration of the first time period may be a fixedduration. The nitrogen acceleration control is a control used forcontrolling the virtual vehicle to explosively accelerate in arelatively long second time period. A duration of the second time periodmay be dynamically determined according to a nitrogen attribute value.

In some embodiments, the jet control and the nitrogen accelerationcontrol are both rewarded prop controls, which may be triggered and usedonly after the virtual vehicle meets a preset condition during travelingand obtains rewarded props. Otherwise, the jet control and the nitrogenacceleration control are displayed in an deactivated state and cannot beused. Schematically, the nitrogen acceleration control is a prop controlthat only may be triggered and used when an available nitrogen valueaccumulates to a threshold.

Operation S303. Receive an operation start event corresponding to atarget interaction control in a process in which the virtual vehicle inthe virtual world is in a normal traveling state.

The user controls the virtual vehicle to travel in the environmentprovided in the virtual world. During traveling, the user may use thedirection key to control the traveling direction of the virtual vehicle.

As shown in FIG. 4, when the virtual vehicle is traveling in the virtualworld, the virtual vehicle is affected by a normal traveling traction F1and a resistance f. The normal traveling traction F1 refers to atraction directed to the front of the vehicle head, and the resistance fincludes at least one of a friction from the ground and a windresistance. The normal traveling traction F1 is greater than or equal tothe resistance f.

In a process in which the virtual vehicle travels in the normaltraveling state, the user may further trigger a drift trigger operationon the target interaction control. In some embodiments, the drifttrigger operation includes a trigger operation with respect to the driftcontrol. Alternatively, the drift trigger operation includes a triggeroperation with respect to the direction control and the drift control.Alternatively, the drift trigger operation includes a trigger operationwith respect to a driving analog peripheral.

In some embodiments, the drift trigger operation may be an operationtriggered through a touch display screen, or may be an operationtriggered by controlling an external input device, for example, anoperation triggered by controlling a mouse, a VR handle, a drivinganalog peripheral, or the like. The driving analog peripheral includesat least one of a steering wheel, a gear lever, an accelerator, and abrake.

In some embodiments, the drift trigger operation may be a tap operation,a combo operation, a long press operation, a slide operation, or thelike. The type of the drift trigger operation is not limited in thisembodiment.

For example, the drift trigger operation is an operation ofsimultaneously pressing the left direction key and the drift control, oran operation of simultaneously pressing the right direction key and thedrift control.

By using an example in which the drift trigger operation is an operationof simultaneously pressing a direction key and a drift control displayedon a touch screen, when the foregoing touch screen detects a user touch,a touch start event is generated in an operating system of the terminal.The touch start event is the operation start event.

Schematically, a touch event in the operating system of the terminal istriggered when the user puts a finger on the screen, slides the fingeron the screen, and/or removes the finger from the screen. There may bethe following several types of touch events.

Touchstart event (touch start event): this event is triggered when afinger starts to touch the screen. Even if one finger has been put onthe screen, the event may still be triggered when another finger touchesthe screen.

Touchmove event (touch move event): this event is continuously triggeredwhen a finger slides on the touch screen. During the occurrence of thisevent, rolling may be prevented by invoking a preventDefault( ) event.

Touchend event (touch end event): this event is triggered when a fingeris removed from the touch screen.

An application in the terminal may determine the touch start eventobtained at the foregoing program level as the operation start eventcorresponding to the target interaction control.

Operation S304. Control, according to the operation start event, thevirtual vehicle to enter a drift state in the virtual world.

The drift state refers to a movement state in which a vehicle bodyslides through a turn in a case that a relatively large angle isgenerated between a vehicle head direction and a traveling direction.The vehicle head direction is directed to the front of the vehicle headof the virtual vehicle. The traveling direction is a direction in whichthe virtual vehicle moves in the virtual world.

Operation S305. Monitor an angle between a vehicle head direction and atraveling direction of the virtual vehicle.

In some embodiments, the terminal monitors the angle between the vehiclehead direction and the traveling direction of the virtual vehicle, andthe monitoring includes, but is not limited to, at least one of thefollowing four manners.

1. The angle between the vehicle head direction and the travelingdirection of the virtual vehicle is monitored in real time in a casethat the virtual vehicle is in the drift state.

2. After receiving the operation end event corresponding to the targetinteraction control, the terminal monitors the angle between the vehiclehead direction and the traveling direction of the virtual vehicle inreal time. The operation end event is triggered when the user operationon the target interaction control starts to disappear, for example, theoperation end event is an event generated when a touch for a touchoperation of simultaneously pressing the direction key and the driftcontrol is canceled.

3. The terminal monitors the angle between the vehicle head directionand the traveling direction of the virtual vehicle at predetermined timeintervals.

4. The terminal monitors the angle between the vehicle head directionand the traveling direction of the virtual vehicle upon receiving adirection control operation.

In this embodiment, when the user stops touching the target interactioncontrol (for example, the user lifts the finger from the direction keyand the drift control), the operating system of the terminal generatesthe touchend event corresponding to the target interaction control, andthe application in the terminal determines the touchend event as anoperation end event. After the operation end event corresponding to thetarget interaction control is received, the terminal monitors the anglebetween the vehicle head direction and the traveling direction of thevirtual vehicle.

In some embodiments, in the process of monitoring the angle, theterminal receives a direction control operation performed by the user,changes the vehicle head direction of the virtual vehicle according tothe direction control operation, and determines an angle between thechanged vehicle head direction and the traveling direction. Thedirection control operation may be an operation performed on thedirection key, or may be an operation performed on a steering wheel.

For example, the direction control operation may be an operation ofpressing the left direction key or an operation of pressing the rightdirection key.

After determining the angle between the vehicle head direction and thetraveling direction of the virtual vehicle, the terminal furtherdetermines a magnitude relationship between the angle and a firstthreshold and a magnitude relationship between the angle and a secondthreshold, the first threshold being greater than the second threshold.Schematically, the first threshold is 45 degrees, and the secondthreshold is 10 degrees.

When the angle is greater than or equal to the first threshold,operation S306 is performed. When the angle is less than the firstthreshold and is greater than or equal to the second threshold,operation S313 is performed. When the angle is less than the secondthreshold, operation S311 is performed.

After the drift trigger operation is over, the vehicle head direction orthe traveling direction of the virtual vehicle is affected by aplurality of factors such as a traction direction, the direction controloperation, and a resistance and thus is changed. Further, because theuser may perform a plurality of times of direction control operations,this operation may be correspondingly performed for a plurality oftimes.

Operation S306. Increase a dynamic drift-holding traction on the virtualvehicle along the vehicle head direction in a case that the anglebetween the vehicle head direction and the traveling direction isgreater than or equal to the first threshold after an operation endevent corresponding to the target interaction control is received, thedynamic drift-holding traction being used for controlling the virtualvehicle to remain in the drift state.

After the drift trigger operation triggered by the user on the targetinteraction control is over, if the terminal determines that the anglebetween the vehicle head direction and the traveling direction of thevirtual vehicle is greater than the first threshold, the terminalincreases a dynamic drift-holding traction on the virtual vehicle alongthe vehicle head direction, the dynamic drift-holding traction beingused for controlling the virtual vehicle to remain in the drift state.

In some embodiments, the “remaining in the drift state” may be referredto as a drift-holding state.

As shown in FIG. 5, a direction of a dynamic drift-holding traction F2of the virtual vehicle is directed to the front of the vehicle head. Thevirtual vehicle in the drift state moves according to a speed V alongthe traveling direction. The virtual vehicle is also affected by afriction f reverse to the speed V. A component F21 of the dynamicdrift-holding traction F2 in the traveling direction is greater than orequal to the friction f, so that the virtual vehicle remains in thedrift state. In this case, another traction component F22 of the dynamicdrift-holding traction F2 changes the vehicle head direction, and thedirection control operation performed by the user is needed to controlthe vehicle head direction of the virtual vehicle. Optionally, in anormal traveling state, the friction f is in a positive correlation witha speed of the virtual vehicle.

In some embodiments, an additional returnability is further added in theapplication. The returnability is used for guiding, in a case that nocontrol signal exists, the virtual vehicle to automatically return to avehicle head direction coinciding with the traveling direction duringthe drift.

In some embodiments, a traction component of the dynamic drift-holdingtraction in the traveling direction is greater than or equal to aresistance.

In some embodiments, a magnitude of the dynamic drift-holding tractionis in a positive correlation with the speed of the virtual vehicle.Alternatively, in a preset speed range, a magnitude of the dynamicdrift-holding traction is in a positive correlation with the speed ofthe virtual vehicle. After the preset speed range is exceeded, themagnitude of the dynamic drift-holding traction may remain unchanged.

In a possible implementation, the resistance received by the virtualvehicle is a ground friction. The ground friction is in a positivecorrelation with the speed of the virtual vehicle in the preset speedrange, and a direction of the ground friction is reverse to thetraveling direction. A friction component of the dynamic drift-holdingtraction received by the virtual vehicle in the traveling directionremains the same as the ground friction. Alternatively, the frictioncomponent is slightly greater than the ground friction but the frictioncomponent has a magnitude such that the virtual vehicle remains in thedrift state.

Operation S307. Change a ground friction of the virtual vehicle from afirst friction value to a second friction value in a case that the anglebetween the vehicle head direction and the traveling direction isgreater than the first threshold after the operation end eventcorresponding to the target interaction control is received, the firstfriction value being greater than the second friction value.

In some embodiments, the first friction value is determined according tothe speed of the virtual vehicle in real time. In a preset speed range,the speed of the virtual vehicle is in a positive correlation with theground friction.

In some embodiments, the second friction value is a relatively smallpreset empirical value. When the application reduces the ground frictionof the virtual vehicle in the process of holding the virtual vehicle inthe drift state, the decay of the speed of the virtual vehicle caused bythe ground friction may be reduced, so that the virtual vehicle iseasier to remain in the drift state.

When there are a plurality of virtual vehicles in the virtual world,ground frictions of the virtual vehicles may be set independently ofeach other, depending on a current speed and a traveling state of thevirtual vehicle.

Operation S308. Continuously increase a nitrogen attribute value of thevirtual vehicle during the drift state.

In the process in which the virtual vehicle enters the drift state, theapplication continuously increases a nitrogen attribute value of anitrogen acceleration control according to a duration of the driftstate. The duration is in a positive correlation with the accumulatednitrogen attribute value. Herein, nitrogen and nitrogen attribute valueare described as examples of an element used for accelerating thevirtual vehicle in the application, but the disclosure is not limitedthereto and includes any other elements that may indicate being usablefor accelerating the virtual vehicle in the application and may bedisplayed in the user interface to be triggered by the user toaccelerate the virtual vehicle.

Operation S309. Activate a nitrogen acceleration control of the virtualvehicle to an available state in a case that the nitrogen attributevalue reaches a trigger threshold.

The nitrogen acceleration control corresponds to a trigger threshold. Ina case that the nitrogen attribute value does not accumulate to thetrigger threshold, the nitrogen acceleration control is in anunavailable state. An available state (or a deactivated state) is astate in which the nitrogen acceleration control is displayed on theuser interface but cannot be triggered or a state not displayed on theuser interface. In a case that the nitrogen attribute value accumulatesto the trigger threshold, the nitrogen acceleration control is activatedto an available state. The available state is a state in which thenitrogen acceleration control is displayed on the user interface andthat may be triggered.

Operation S310. Control, in a case that a trigger signal with respect tothe nitrogen acceleration control is received, the virtual vehicle toaccelerate.

In some embodiments, the nitrogen acceleration control is a controldisplayed on the touch display screen. When the nitrogen accelerationcontrol is in the available state, if the user presses the nitrogenacceleration control, the terminal receives a trigger signal withrespect to the nitrogen acceleration control, and controls, according tothe trigger signal, the virtual vehicle to accelerate.

The terminal may control, according to remaining available nitrogen inthe nitrogen attribute value, the virtual vehicle to accelerate, thatis, the acceleration process needs to constantly consume the nitrogen inthe nitrogen attribute value. When the nitrogen in the nitrogenattribute value runs out, the terminal controls the virtual vehicle toexit from the acceleration state.

In some embodiments, if the virtual vehicle collides with another objectin the acceleration process, the terminal also controls the virtualvehicle to exit from the acceleration state.

Operation S311. Control, in a case that the angle between the vehiclehead direction and the traveling direction is less than the firstthreshold in the process of controlling the virtual vehicle to remain inthe drift state, the virtual vehicle to restore the normal travelingstate.

The terminal may switch a traction from the dynamic drift-holdingtraction to a normal traveling traction, the normal traveling tractionbeing used for controlling the virtual vehicle to enter the normaltraveling state.

Operation S312. Change the ground friction of the virtual vehicle fromthe second friction value to the first friction value in a case that theangle between the vehicle head direction and the traveling direction isless than the first threshold in the process of controlling the virtualvehicle to remain in the drift state.

In this case, the application further changes the ground friction of thevirtual vehicle from the second friction value to the first frictionvalue.

In some embodiments, the first friction value is determined according tothe speed of the virtual vehicle in real time. In a preset speed range,the speed of the virtual vehicle is in a positive correlation with theground friction.

In some embodiments, the second friction value is a relatively smallpreset empirical value.

Operation S313. Control, in a case that the angle between the vehiclehead direction and the traveling direction is less than a secondthreshold after the operation end event corresponding to the targetinteraction control is received, the virtual vehicle to switch from thedrift state to the normal traveling state after a target duration.

After the operation end event corresponding to the target interactioncontrol is received, in a case that the angle between the vehicle headdirection and the traveling direction is relatively small (for example,less than 10 degrees), the virtual vehicle enters another short driftstate. The “short drift state” may be referred to as a point-driftstate. The point-drift state is a state different from the drift-holdingstate. The application controls the virtual vehicle to switch from thedrift state to the normal traveling state after a short target duration.

In some embodiments, the application calculates, according to the speedof the virtual vehicle and the ground friction, a decay duration duringwhich the virtual vehicle decays from the drift state to the normaltraveling state, controls, in a case that the decay duration is greaterthan a shortest drift duration, the virtual vehicle to decay from thedrift state to the normal traveling state according to the decayduration, and controls, in a case that the decay duration is less thanthe shortest drift duration, the virtual vehicle to decay from the driftstate to the normal traveling state according to the shortest driftduration.

In some embodiments, after the operation end event corresponding to thetarget interaction control is received, in a case that the angle betweenthe vehicle head direction and the traveling direction is less than thesecond threshold, the application further changes the ground friction ofthe virtual vehicle from the second friction value to the first frictionvalue, so that the virtual vehicle switches from the point-drift stateto the normal traveling state.

In addition, the point-drift state is also a drift state. Therefore, theapplication further performs operation S308, that is, continuouslyincreases a nitrogen attribute value of the virtual vehicle during thedrift state (point-drift state). The point-drift state may help the userto quickly accumulate a few nitrogen attribute values. When the nitrogenattribute value accumulated in a drift-holding manner or an ordinarydrift manner is to reach the trigger threshold, the user may accumulatethe remaining nitrogen value by using the point-drift state.

Thus, according to the method provided in this embodiment, after theoperation end event corresponding to the target interaction control isreceived, in a case that the angle between the vehicle head directionand the traveling direction is greater than the first threshold, thevirtual vehicle is controlled to remain in the drift state. In this way,in the process of controlling the virtual vehicle to remain in the driftstate, the user may only control the angle between the vehicle headdirection and the traveling direction and does not need tosimultaneously press a direction key and a drift control. Therefore, theuser may only need to press the direction key to control the vehiclehead direction, thereby reducing the difficulty of operation to remainin the drift state, and improving the convenience of man-machineinteractions in some scenarios that are not suitable for long-termoperation performed by using hands.

According to the method provided in this embodiment, after the operationend event corresponding to the target interaction control is received,at each time the direction control operation of the user is received, itis further determined whether the angle between the vehicle headdirection and the traveling direction of the virtual vehicle is greaterthan a threshold. In a case that the angle between the vehicle headdirection and the traveling direction of the virtual vehicle is greaterthan the first threshold, the virtual vehicle remains in the driftstate, and the nitrogen attribute value of the nitrogen accelerationcontrol is accumulated according to the duration in which the virtualvehicle is in the drift state (drift holding). In a relatively conciseman-machine interaction manner, the user may quickly accumulate anavailable nitrogen value, to obtain more nitrogen acceleration controlsof a rewarding property.

According to the method provided in this embodiment, after the operationend event corresponding to the target interaction control is received,in a case that the angle between the vehicle head direction and thetraveling direction of the virtual vehicle is less than the secondthreshold, the virtual vehicle enters in the point-drift state, and thenitrogen attribute value of the nitrogen acceleration control isaccumulated according to the duration in which the virtual vehicle is inthe drift state (point drift). In a short man-machine interactionmanner, the user may quickly accumulate a few available nitrogen values,and do not need to greatly change the traveling direction of the virtualvehicle, so that when the nitrogen attribute value accumulated in thedrift-holding state or the ordinary drift state is to reach thethreshold, the user may obtain the nitrogen acceleration control of arewarding property more quickly by using the point-drift state.

FIG. 6 is a flowchart of a drift method for a virtual vehicle in avirtual world according to another example embodiment of the disclosure.In an example, the drift method in this embodiment include operationsS601-S607

S601. The user opens the application and starts an automobile racinggame.

S602. The user controls a vehicle to enter a drift by pressing buttons(e.g., the direction key and the drift key), and operation S604 isperformed.

S604. When the virtual vehicle enters a drift, the application controlsthe racing automobile to remain in a drift state, and remaining in adrift state may be referred to as drift holding.

S603. The user releases the buttons (e.g., the direction key and thedrift key) and cancels the drift trigger operation.

S605. If the user chooses to reset the vehicle head to a straighttraveling direction, the user may trigger one or more of the followingoperations:

clicking/tapping the direction key, and rotating the vehicle headtowards a direction away from to the drift direction (or toward thetraveling direction);

continuously reducing an angle between the vehicle head direction and amovement direction of the vehicle; and

breaking from the drift state in a case that the angle is less than acertain degree.

S606. The application controls the racing automobile to end the drift,and when the vehicle head is successfully reset to the straighttraveling direction during the drift, the vehicle enters the normaltraveling state.

S607. If the user chooses not to reset the vehicle head to the straighttraveling direction, the user may trigger one or more of the followingoperations:

setting an automatic returnability for the vehicle head when the vehicleenters a drift-holding state;

properly clicking/tapping the direction key, and rotating the vehiclehead towards the same direction as the drift direction;

keeping the angle between the vehicle head direction and the movementdirection of the vehicle approximately unchanged; and

remaining in a limitlessly drift-holding state.

The returnability is used for guiding, in a case that no control signalexists, the virtual vehicle to automatically return to a vehicle headdirection coinciding with the traveling direction during the drift.

FIGS. 7 and 8 are schematic interface diagrams of a drift method for avirtual vehicle in a virtual world according to an example embodiment ofthe disclosure.

In some embodiments, as shown in FIG. 7, during the drift holding, theuser interface may further be overlaid with and display a firstcharacter “drift holding” 71. According to another aspect, as shown inFIG. 8, during the drift holding, a tire trace 72 of the virtual vehicleon the track caused by the drift holding is shown longer.

Referring to FIG. 5, during the continuous drift of the racingautomobile in this embodiment of the disclosure, in addition to aninertial speed V, there is also a relatively large ‘drift-holding’ powerF2. The power and the friction f act jointly. In this case, an F/f powercalculation changes dynamically, which results in a similar effect thatthe racing automobile is performing a uniform circular motion (a motionof a dynamic arc in the actual implementation). Theoretically, the“drift-holding” state of the racing automobile may be maintainedindefinitely.

Schematically, FIG. 9 shows a calculation method of the dynamic drifttraction F2 and the friction f according to an example embodiment of thedisclosure. The dynamic drift traction F2 changes as a real-time speedof the racing automobile changes. A higher speed of the racingautomobile indicates a larger dynamic drift traction F2. After the speedof the racing automobile reaches a certain degree, the dynamic drifttraction F2 stops increasing. The traction f also changes as thereal-time speed of the racing automobile changes, and a magnitude of thefriction f is in direct proportion to the square of the real-time speedof the racing automobile.

During the drift holding, the user needs to control the vehicle headdirection of the virtual racing automobile in real time, for example,control the angle between the vehicle head direction and the travelingdirection to a range from 35 degrees to 45 degrees. A reason that theuser needs to control the vehicle head direction is because the userneeds to control the angle between the vehicle head direction and thetraveling direction in real time not to be too small, otherwise theracing automobile exits the drift state. An operation basis of the driftholding is that the user controls the angle between the vehicle headdirection and the traveling direction such that a joint force receivedby the racing automobile is maintained similar to a centripetal force,and the racing automobile performs a motion similar to a circularmotion. In an actual implementation, the route of the racing automobilemay not be a standard arc, but a non-standard arc that changes in realtime. In this manner, the user may have better game experience using atrack design. Different track arcs require players to control differentdrift angles.

In some embodiments, when the drift holding needs to end, the playerneeds to control the vehicle head to rotate so that the angle betweenthe vehicle head direction and the traveling direction is 0 degrees (ora substantially small degree). In this way, the racing automobile is inthe normal traveling state, and the dynamic drift traction F2 in FIG. 5is switched to the normal traveling traction F1 in FIG. 4. F1 is aconstant value, and the friction f still increases as the speedincreases. A balance is finally achieved between the normal travelingtraction f and the friction F1, and the racing automobile may perform auniform linear motion in a line, which conforms to a power designprinciple of vehicles in the real world.

In an optional embodiment, after operation S603, if the user releasesthe buttons, and the angle between the vehicle head direction and thetraveling direction of the virtual vehicle is within 10 degrees, thevirtual vehicle does not enter the drift-holding state, but entersanother short drift state referred to as the point-drift state. Aftermaintaining the short drift state, the racing automobile switches fromthe drift state to the normal traveling state. In some embodiments, asshown in FIG. 10, during the point drift, the user interface may furtherbe overlaid with and display a second character “point drift” 74.

Apparatus embodiments of the disclosure are described below, where theapparatus embodiments correspond to the foregoing method embodiments.Repetitive descriptions are avoided and for a part that is not describedin detail in the apparatus embodiments, the corresponding descriptionsin the foregoing method embodiments may be referred to.

FIG. 11 is a schematic structural block diagram of a drift apparatus fora virtual vehicle in a virtual world according to an example embodimentof the disclosure. The apparatus may be implemented as the entire or apart of a terminal by using software, hardware, or a combinationthereof. The apparatus includes:

an interaction module 1120, configured to receive an operation startevent corresponding to a target interaction control in a process inwhich a virtual vehicle in the virtual world is in a normal travelingstate, the target interaction control being a control or a set ofcontrols configured to trigger a drift state of the virtual vehicle; anda control module 1140, configured to control, according to the operationstart event, the virtual vehicle to enter the drift state in the virtualworld.

The control module 1140 is configured to control, in a case that anangle between a vehicle head direction and a traveling direction isgreater than a first threshold after an operation end eventcorresponding to the target interaction control is received, the virtualvehicle to remain in the drift state.

In an optional embodiment, the control module 1140 is configured toincrease a dynamic drift-holding traction on the virtual vehicle alongthe vehicle head direction, the dynamic drift-holding traction beingused for controlling the virtual vehicle to remain in the drift state.

In an optional embodiment, a magnitude of the dynamic drift-holdingtraction is in a positive correlation with a speed of the virtualvehicle in a preset speed range.

In an optional embodiment, the control module 1140 is further configuredto change a ground friction of the virtual vehicle from a first frictionvalue to a second friction value in a case that the angle between thevehicle head direction and the traveling direction is greater than thefirst threshold after the operation end event corresponding to thetarget interaction control is received, the first friction value beinggreater than the second friction value.

In an optional embodiment, the control module 1140 is further configuredto continuously increase a nitrogen attribute value of the virtualvehicle during the drift state, activate a nitrogen acceleration controlof the virtual vehicle to an available state in a case that the nitrogenattribute value reaches a trigger threshold, and control, in a case thata trigger signal with respect to the nitrogen acceleration control isreceived, the virtual vehicle to perform an acceleration operation.

In an optional embodiment, the control module 1140 is further configuredto control, in a case that the angle between the vehicle head directionand the traveling direction is less than the first threshold in theprocess of controlling the virtual vehicle to remain in the drift state,the virtual vehicle to restore the normal traveling state.

In an optional embodiment, the control module 1140 is further configuredto change the ground friction of the virtual vehicle from the secondfriction value to the first friction value in a case that it is detectedthat the angle between the vehicle head direction and the travelingdirection is less than the first threshold in the process of controllingthe virtual vehicle to remain in the drift state, the first frictionvalue being greater than the second friction value.

In an optional embodiment, the control module 1140 is further configuredto switch the dynamic drift-holding traction to a normal travelingtraction, the normal traveling traction being used for controlling thevirtual vehicle to enter the normal traveling state, and the dynamicdrift-holding traction being greater than the normal traveling traction.

In an optional embodiment, the apparatus further includes a monitoringmodule 1160.

The interaction module 1120 is further configured to receive a directioncontrol operation.

The control module 1140 is further configured to change the vehicle headdirection of the virtual vehicle according to the direction controloperation.

The monitoring module 1160 is further configured to determine an anglebetween the changed vehicle head direction and the traveling direction.

In an optional embodiment, the control module 1140 is configured tocontrol, in a case that the angle between the vehicle head direction andthe traveling direction is less than a second threshold after theoperation end event corresponding to the target interaction control isreceived, the virtual vehicle to switch from the drift state to thenormal traveling state after a target duration, the second thresholdbeing less than the first threshold.

In an optional embodiment, the control module 1140 is configured tocalculate, according to the speed of the virtual vehicle and the groundfriction, a decay duration during which the virtual vehicle decays fromthe drift state to the normal traveling state; control, in a case thatthe decay duration is greater than a shortest drift duration, thevirtual vehicle to decay from the drift state to the normal travelingstate according to the decay duration; and control, in a case that thedecay duration is less than the shortest drift duration, the virtualvehicle to decay from the drift state to the normal traveling stateaccording to the shortest drift duration.

Thus, according to the apparatus provided in this embodiment, after theoperation end event corresponding to the target interaction control isreceived, in a case that the angle between the vehicle head directionand the traveling direction is greater than the first threshold, thevirtual vehicle is controlled to remain in the drift state. In this way,in the process of controlling the virtual vehicle to remain in the driftstate, the user may only control the angle between the vehicle headdirection and the traveling direction and does not need tosimultaneously press a direction key and a drift control. Therefore, theuser may only need to press the direction key to control the vehiclehead direction to remain in the drift state, thereby reducing thedifficulty of operation, and improving the convenience of man-machineinteractions in some scenarios that are not suitable for long-termoperation performed by using hands.

FIG. 12 is a structural block diagram of a terminal 1200 according to anexample embodiment of the disclosure. The terminal 1200 may be asmartphone, a tablet computer, a moving picture experts group audiolayer III (MP3) player, a moving picture experts group audio layer IV(MP4) player, a notebook computer, or a desktop computer. The terminal1200 may also be referred to as other names such as user equipment, aportable terminal, a laptop terminal, or a desktop terminal.

Generally, the terminal 1200 includes a processor 1201 and a memory1202.

The processor 1201 may include one or more processing cores, and may be,for example, a 4-core processor or an 8-core processor. The processor1201 may be implemented in at least one hardware form of a digitalsignal processor (DSP), a field-programmable gate array (FPGA), and aprogrammable logic array (PLA). The processor 1201 may alternativelyinclude a main processor and a coprocessor. The main processor is aprocessor that is configured to process data in an awake state, alsoreferred to as a central processing unit (CPU), and the coprocessor is alow-power processor that is configured to process data in an idle state.In some embodiments, the processor 1201 may be integrated with agraphics processing unit (GPU). The GPU is responsible for rendering anddrawing content to be displayed by a display screen. In someembodiments, the processor 1201 may further include an artificialintelligence (AI) processor. The AI processor is configured to process acalculation operation related to machine learning.

The memory 1202 may include one or more computer-readable storage media.The computer-readable storage medium may be non-transient. The memory1202 may further include a high-speed random access memory, and anon-volatile memory such as one or more magnetic disk storage devicesand a flash storage device. In some embodiments, the non-transitorycomputer-readable storage medium in the memory 1202 is configured tostore at least one instruction, the at least one instruction beingconfigured to be executed by the processor 1201 to implement the driftmethod for a virtual vehicle in a virtual world provided in the methodembodiments of the disclosure.

In some embodiments, the terminal 1200 may alternatively include: aperipheral device interface 1203 and at least one peripheral device. Theprocessor 1201, the memory 1202, and the peripheral device interface1203 may be connected through a bus or a signal cable. Each peripheraldevice may be connected to the peripheral device interface 1203 througha bus, a signal cable, or a circuit board. Specifically, the peripheraldevice includes: at least one of a radio frequency circuit 1204, a touchdisplay screen 1205, a camera component 1206, an audio circuit 1207, apositioning component 1208, and a power supply 1209.

The peripheral device interface 1203 may be configured to connect the atleast one peripheral device related to input/output (I/O) to theprocessor 1201 and the memory 1202. In some embodiments, the processor1201, the memory 1202, and the peripheral device interface 1203 areintegrated on a same chip or circuit board. In some other embodiments,any one or two of the processor 1201, the memory 1202, and theperipheral device interface 1203 may be implemented on a separate chipor the circuit board. This is not limited in this embodiment.

The radio frequency circuit 1204 is configured to receive and transmit aradio frequency (RF) signal, also referred to as an electromagneticsignal. The RF circuit 1204 communicates with a communication networkand another communication device by using the electromagnetic signal.The RF circuit 1204 converts an electric signal into an electromagneticsignal for transmission, or converts a received electromagnetic signalinto an electric signal. In some embodiments, the RF circuit 1204includes: an antenna system, an RF transceiver, one or more amplifiers,a tuner, an oscillator, a digital signal processor, a codec chip set, asubscriber identity module card, and the like. The RF circuit 1204 maycommunicate with other terminals through at least one wirelesscommunication protocol. The wireless communication protocol includes,but is not limited to, a metropolitan area network, generations ofmobile communication networks (2G, 3G, 4G, and 5G), a wireless localarea network, and/or a wireless fidelity (WiFi) network. In someembodiments, the RF circuit 1204 may also include a circuit related tonear field communication (NFC). This is not limited in the disclosure.

The display screen 1205 is configured to display a user interface (UI).The UI may include a graphic, text, an icon, a video, and anycombination thereof. When the display screen 1205 is the touch displayscreen, the display screen 1205 also has the capability to collect atouch signal on or above a surface of the display screen 1205. The touchsignal may be inputted into the processor 1201 as a control signal forprocessing. In this case, the display screen 1205 may be furtherconfigured to provide a virtual button and/or a virtual keyboard, alsoreferred to as a soft button and/or a soft keyboard. In someembodiments, there may be one display screen 1205, disposed on a frontpanel of the terminal 1200. In some other embodiments, there may be twodisplay screens 1205, respectively disposed on different surfaces of theterminal 1200 or designed in a foldable shape. In still some otherembodiments, the display screen 1205 may be a flexible display screen,disposed on a curved surface or a folded surface of the terminal 1200.Even, the display screen 1205 may be further set to have anon-rectangular irregular graph, that is, a special-shaped screen. Thedisplay screen 1205 may be manufactured by using a material such as aliquid crystal display (LCD), an organic light-emitting diode (OLED), orthe like.

The camera component 1206 is configured to collect an image or a video.In some embodiments, the camera component 1206 includes a front-facingcamera and a rear-facing camera. Generally, the front-facing camera isdisposed on the front panel of the terminal, and the rear-facing camerais disposed on a back surface of the terminal. In some embodiments,there are at least two rear-facing cameras, each being any one of a maincamera, a depth of field camera, a wide-angle camera, and a telephotocamera, to implement a background blurring function through fusion ofthe main camera and the depth of field camera, panoramic photo shootingand virtual reality (VR) shooting functions through fusion of the maincamera and wide-angle camera, or another fusion shooting function. Insome embodiments, the camera component 1206 may further include a flash.The flash may be a single color temperature flash or a double colortemperature flash. The double color temperature flash refers to acombination of a warm flash and a cold flash, and may be configured toperform light ray compensation at different color temperatures.

The audio circuit 1207 may include a microphone and a loudspeaker. Themicrophone is configured to collect sound waves of a user and anenvironment, and convert the sound waves into electrical signals andinput the electrical signals into the processor 1201 for processing, orinput the electrical signals into the RF circuit 1204 to implementspeech communication. For stereo collection or noise reduction, theremay be a plurality of microphones, disposed at different portions of theterminal 1200 respectively. The microphone may alternatively be amicrophone array or an omnidirectional collection microphone. Theloudspeaker is configured to convert electrical signals from theprocessor 1201 or the RF circuit 1204 into sound waves. The loudspeakermay be a conventional thin-film loudspeaker or a piezoelectric ceramicloudspeaker. When the loudspeaker is the piezoelectric ceramicloudspeaker, electrical signals not only may be converted into soundwaves that may be heard by human, but also may be converted into soundwaves that cannot be heard by human for ranging and the like. In someembodiments, the audio circuit 1207 may further include an earphonejack.

The positioning component 1208 is configured to position a currentgeographic location of the terminal 1200 for implementing navigation ora location-based service (LBS). The positioning component 1208 may be apositioning component based on the global positioning system (GPS) ofthe United States, the COMPASS System of China, the GLONASS System ofRussia, or the GALILEO System of the European Union.

The power supply 1209 is configured to supply power to components in theterminal 1200. The power supply 1209 may be an alternating current, adirect current, a primary battery, or a rechargeable battery. When thepower supply 1209 includes the rechargeable battery, the rechargeablebattery may be a wired rechargeable battery or a wireless rechargeablebattery. The rechargeable battery may be further configured to support afast charge technology.

In some embodiments, the terminal 1200 may also include one or moresensors 1210. The one or more sensors 1210 include, but are not limitedto, an acceleration sensor 1211, a gyroscope sensor 1212, a pressuresensor 1213, a fingerprint sensor 1214, an optical sensor 1215, and aproximity sensor 1216.

The acceleration sensor 1211 may detect a magnitude of acceleration onthree coordinate axes of a coordinate system established with theterminal 1200. For example, the acceleration sensor 1211 may beconfigured to detect a component of gravity acceleration on the threecoordinate axes. The processor 1201 may control, according to a gravityacceleration signal collected by the acceleration sensor 1211, the touchdisplay screen 1205 to display the user interface in a frame view or aportrait view. The acceleration sensor 1211 may be further configured tocollect motion data of a game or a user.

The gyroscope sensor 1212 may detect a body direction and a rotationangle of the terminal 1200. The gyroscope sensor 1212 may cooperate withthe acceleration sensor 1211 to collect a 3D action by the user on theterminal 1200. The processor 1201 may implement the following functionsaccording to data collected by the gyroscope sensor 1212: motion sensing(for example, the UI is changed according to a tilt operation of theuser), image stabilization during shooting, game control, and inertialnavigation.

The pressure sensor 1213 may be disposed on a side frame of the terminal1200 and/or a lower layer of the touch display screen 1205. When thepressure sensor 1213 is disposed on the side frame of the terminal 1200,a holding signal of the user on the terminal 1200 may be detected. Theprocessor 1201 performs left and right hand recognition or a quickoperation according to the holding signal collected by the pressuresensor 1213. When the pressure sensor 1213 is disposed on the low layerof the touch display screen 1205, the processor 1201 controls, accordingto a pressure operation of the user on the touch display screen 1205, anoperable control on the UI. The operable control includes at least oneof a button control, a scroll bar control, an icon control, and a menucontrol.

The fingerprint sensor 1214 is configured to collect a fingerprint ofthe user. The processor 1201 identifies an identity of the useraccording to the fingerprint collected by the fingerprint sensor 1214,or the fingerprint sensor 1214 identifies an identity of the useraccording to the collected fingerprint. When the identity of the user isidentified as a trusted identity, the processor 1201 authorizes the userto perform a related sensitive operation. The sensitive operationincludes unlocking a screen, viewing encrypted information, downloadingsoftware, payment, changing settings, and the like. The fingerprintsensor 1214 may be disposed on a front face, a back face, or a side faceof the terminal 1200. When a physical button or a vendor logo isdisposed on the terminal 1200, the fingerprint 1214 may be integratedwith the physical button or the vendor logo.

The optical sensor 1215 is configured to collect ambient lightintensity. In an embodiment, the processor 1201 may control displayluminance of the touch display screen 1205 according to the ambientlight intensity collected by the optical sensor 1215. Specifically, whenthe ambient light intensity is relatively high, the display luminance ofthe touch display screen 1205 is increased. When the ambient lightintensity is relatively low, the display luminance of the touch displayscreen 1205 is reduced. In another embodiment, the processor 1201 mayfurther dynamically adjust a camera parameter of the camera component1206 according to the ambient light intensity collected by the opticalsensor 1215.

The proximity sensor 1216, also referred to as a distance sensor, isgenerally disposed on the front panel of the terminal 1200. Theproximity sensor 1216 is configured to collect a distance between theuser and the front surface of the terminal 1200. In an embodiment, whenthe proximity sensor 1216 detects that the distance between the user andthe front surface of the terminal 1200 gradually becomes smaller, thetouch display screen 1205 is controlled by the processor 1201 to switchfrom a screen-on state to a screen-off state. In a case that theproximity sensor 1216 detects that the distance between the user and thefront surface of the terminal 1200 gradually becomes larger, the touchdisplay screen 1205 is controlled by the processor 1201 to switch fromthe screen-off state to the screen-on state.

A person skilled in the art may understand that the structure shown inFIG. 12 constitutes no limitation on the terminal 1200, and the terminalmay include more or fewer components than those shown in the figure, orsome components may be combined, or a different component deployment maybe used.

In an embodiment, a terminal is provided, including a processor and amemory, the memory storing a computer program, the computer program,when executed by the processor, causing the processor to perform theoperations of the drift method for a virtual vehicle in a virtual world.The operations of the drift method for a virtual vehicle in a virtualworld herein may be the operations of the drift method for a virtualvehicle in a virtual world according to the foregoing embodiments.

In an embodiment, a computer-readable storage medium is provided,storing a computer program, the computer program, when being executed bya processor, causing the processor to perform the operations of theforegoing drift method for a virtual vehicle in a virtual world. Theoperations of the drift method for a virtual vehicle in a virtual worldherein may be the operations of the drift method for a virtual vehiclein a virtual world according to the foregoing embodiments.

In an embodiment, a computer-readable storage medium is provided. Thecomputer-readable storage medium is a non-volatile computer-readablestorage medium. The computer-readable storage medium stores a computerprogram. The stored computer program, when executed by a processingcomponent, may implement the drift method for a virtual vehicle in avirtual world provided in the foregoing embodiments of the presentdisclosure.

“Plurality of” mentioned in the specification means two or more.“And/or” describes an association relationship for describing associatedobjects and represents that three relationships may exist. For example,A and/or B may represent the following three cases: Only A exists, bothA and B exist, and only B exists. The character “/” generally indicatesan “or” relationship between the associated objects.

The sequence numbers of the foregoing embodiments of the disclosure aremerely for description purpose, and do not indicate the preference amongthe embodiments.

A person of ordinary skill in the art may understand that all or some ofthe operations of the embodiments may be implemented by hardware, or maybe implemented by a program instructing related hardware. The programmay be stored in a computer-readable storage medium. The storage mediummentioned above may include: a read-only memory, a magnetic disk, or anoptical disc.

At least one of the components, elements, modules or units describedherein may be embodied as various numbers of hardware, software and/orfirmware structures that execute respective functions described above,according to an example embodiment. For example, at least one of thesecomponents, elements or units may use a direct circuit structure, suchas a memory, a processor, a logic circuit, a look-up table, etc. thatmay execute the respective functions through controls of one or moremicroprocessors or other control apparatuses. Also, at least one ofthese components, elements or units may be specifically embodied by amodule, a program, or a part of code, which contains one or moreexecutable instructions for performing specified logic functions, andexecuted by one or more microprocessors or other control apparatuses.Also, at least one of these components, elements or units may furtherinclude or implemented by a processor such as a central processing unit(CPU) that performs the respective functions, a microprocessor, or thelike. Two or more of these components, elements or units may be combinedinto one single component, element or unit which performs all operationsor functions of the combined two or more components, elements of units.Also, at least part of functions of at least one of these components,elements or units may be performed by another of these components,element or units. Further, although a bus is not illustrated in theblock diagrams, communication between the components, elements or unitsmay be performed through the bus. Functional aspects of the aboveexample embodiments may be implemented in algorithms that execute on oneor more processors. Furthermore, the components, elements or unitsrepresented by a block or processing operations may employ any number ofrelated art techniques for electronics configuration, signal processingand/or control, data processing and the like.

The foregoing descriptions are merely example embodiments of thedisclosure, but are not intended to limit the disclosure. Anymodification, equivalent replacement, or improvement made within thespirit and principle of the disclosure shall fall within the protectionscope of the disclosure.

What is claimed is:
 1. A drift method for a virtual vehicle in a virtualworld, performed by a terminal comprising at least one processor, themethod comprising: receiving an operation start event with respect to atarget interaction control that is provided on a user interface of anapplication while a virtual vehicle in a virtual world in theapplication is in a normal traveling state; controlling, according tothe operation start event, the virtual vehicle to enter a drift state inthe virtual world; and after an operation end event with respect to thetarget interaction control is received, controlling the virtual vehicleto remain in the drift state based on an angle between a vehicle headdirection and a traveling direction being greater than or equal to afirst threshold.
 2. The method according to claim 1, wherein thecontrolling the virtual vehicle to remain in the drift state comprises:increasing a dynamic drift-holding traction on the virtual vehicle alongthe vehicle head direction, the dynamic drift-holding traction beingused for controlling the virtual vehicle to remain in the drift state.3. The method according to claim 2, wherein a magnitude of the dynamicdrift-holding traction is in a positive correlation with a speed of thevirtual vehicle in a preset speed range.
 4. The method according toclaim 2, further comprising: changing a ground friction of the virtualvehicle from a first friction value to a second friction value based onthe angle between the vehicle head direction and the traveling directionbeing greater than or equal to the first threshold after the operationend event corresponding to the target interaction control is received,the first friction value being greater than the second friction value.5. The method according to claim 1, further comprising: continuouslyincreasing an attribute value of the virtual vehicle during the driftstate; activating an acceleration control of the virtual vehicle on theuser interface based on the attribute value reaching a triggerthreshold; and based on a trigger signal with respect to theacceleration control being received, controlling the virtual vehicle toaccelerate.
 6. The method according to claim 1, further comprising:based on the angle between the vehicle head direction and the travelingdirection being less than the first threshold while the virtual vehicleis in the drift state, controlling the virtual vehicle to restore thenormal traveling state.
 7. The method according to claim 6, wherein thecontrolling the virtual vehicle to restore the normal traveling statecomprises: switching a dynamic drift-holding traction of the virtualvehicle to a normal traveling traction, the dynamic drift-holdingtraction being used for controlling the virtual vehicle to remain in thedrift state and the normal traveling traction being used for controllingthe virtual vehicle to enter the normal traveling state, and the dynamicdrift-holding traction being greater than the normal traveling traction.8. The method according to claim 6, further comprising: changing aground friction of the virtual vehicle from a second friction value to afirst friction value based on the angle between the vehicle headdirection and the traveling direction being less than the firstthreshold while the virtual vehicle is in the drift state, the secondfriction value being a friction value at which the virtual vehicleremains in the drift state, and the first friction value being greaterthan the second friction value.
 9. The method according to claim 1,further comprising: receiving a direction control operation; changingthe vehicle head direction of the virtual vehicle according to thedirection control operation; and determining an angle between thechanged vehicle head direction and the traveling direction.
 10. Themethod according to claim 1, further comprising: after the operation endevent corresponding to the target interaction control is received,controlling the virtual vehicle to switch from the drift state to thenormal traveling state upon a lapse of a target duration, based on theangle between the vehicle head direction and the traveling directionbeing less than a second threshold, the second threshold being less thanthe first threshold.
 11. The method according to claim 10, wherein thecontrolling the virtual vehicle to switch from the drift state to thenormal traveling state upon the lapse of the target duration comprises:calculating, according to a speed of the virtual vehicle and a groundfriction on the virtual vehicle, a decay duration during which thevirtual vehicle transitions from the drift state to the normal travelingstate; controlling, based on the decay duration being greater than orequal to a shortest drift duration, the virtual vehicle to transitionfrom the drift state to the normal traveling state according to thedecay duration; and controlling, based on the decay duration being lessthan the shortest drift duration, the virtual vehicle to transition fromthe drift state to the normal traveling state according to the shortestdrift duration.
 12. A drift apparatus for a virtual vehicle in a virtualworld, comprising: at least one memory configured to store program code;and at least one processor configured to read the program code andoperate as instructed by the program code, the program code comprising:interaction code configured to cause at least one of the at least oneprocessor to receive an operation start event with respect to a targetinteraction control that is provided on a user interface of anapplication while a virtual vehicle in a virtual world in theapplication is in a normal traveling state; and control code configuredto cause at least one of the at least one processor to control,according to the operation start event, the virtual vehicle to enter adrift state in the virtual world, the control code being furtherconfigured cause at least one of the at least one processor to, after anoperation end event with respect to the target interaction control isreceived, control the virtual vehicle to remain in the drift state basedon an angle between a vehicle head direction and a traveling directionbeing greater than or equal to a first threshold.
 13. The apparatusaccording to claim 12, wherein the control code is further configured tocause at least one of the at least one processor to increase a dynamicdrift-holding traction on the virtual vehicle along the vehicle headdirection based on the angle between the vehicle head direction and thetraveling direction being greater than the first threshold after theoperation end event corresponding to the target interaction control isreceived, the dynamic drift-holding traction being used for controllingthe virtual vehicle to remain in the drift state.
 14. The apparatusaccording to claim 12, wherein the control code is further configured tocause at least one of the at least one processor to change a groundfriction of the virtual vehicle from a first friction value to a secondfriction value based on the angle between the vehicle head direction andthe traveling direction being greater than or equal to the firstthreshold after the operation end event corresponding to the targetinteraction control is received, the first friction value being greaterthan the second friction value.
 15. The apparatus according to claim 12,wherein the control code is further configured to cause at least one ofthe at least one processor to continuously increase an attribute valueof the virtual vehicle during the drift state, activate an accelerationcontrol of the virtual vehicle on the user interface based on theattribute value reaching a trigger threshold, and control the virtualvehicle to accelerate based on a trigger signal with respect to theacceleration control being received.
 16. The apparatus according toclaim 12, wherein the control code is further configured to cause atleast one of the at least one processor to control the virtual vehicleto restore the normal traveling state, based on the angle between thevehicle head direction and the traveling direction being less than thefirst threshold while the virtual vehicle is in the drift state.
 17. Theapparatus according to claim 16, wherein the control code is furtherconfigured to cause at least one of the at least one processor to switcha dynamic drift-holding traction of the virtual vehicle to a normaltraveling traction, the dynamic drift-holding traction being used forcontrolling the virtual vehicle to remain in the drift state and thenormal traveling traction being used for controlling the virtual vehicleto enter the normal traveling state, and the dynamic drift-holdingtraction being greater than the normal traveling traction.
 18. Theapparatus according to claim 16, wherein the control code is furtherconfigured to cause at least one of the at least one processor to changea ground friction of the virtual vehicle from a second friction value toa first friction value based on the angle between the vehicle headdirection and the traveling direction being less than the firstthreshold while the virtual vehicle is in the drift state, the secondfriction value being a friction value at which the virtual vehicleremains in the drift state, and the first friction value being greaterthan the second friction value.
 19. A terminal, comprising a processorand a memory, the memory storing computer-readable instructions, thecomputer-readable instructions, when being executed by the processor,causing the processor to perform operations in the method according toclaim
 1. 20. A non-transitory computer-readable storage medium, storingcomputer-readable instructions, the computer-readable instructions, whenexecuted by one or more processors, causing the one or more processorsto perform: receiving an operation start event with respect to a targetinteraction control that is provided on a user interface of anapplication while a virtual vehicle in a virtual world in theapplication is in a normal traveling state; controlling, according tothe operation start event, the virtual vehicle to enter a drift state inthe virtual world; and after an operation end event with respect to thetarget interaction control is received, controlling the virtual vehicleto remain in the drift state based on an angle between a vehicle headdirection and a traveling direction being greater than or equal to afirst threshold.